3.7.74 \(\int \frac {\sqrt {-\cos (c+d x)}}{\sqrt {-3+2 \cos (c+d x)}} \, dx\) [674]

Optimal. Leaf size=77 \[ \frac {3 \cot (c+d x) \Pi \left (-\frac {1}{2};\text {ArcSin}\left (\frac {\sqrt {-3+2 \cos (c+d x)}}{\sqrt {-\cos (c+d x)}}\right )|-\frac {1}{5}\right ) \sqrt {1-\sec (c+d x)} \sqrt {1+\sec (c+d x)}}{\sqrt {5} d} \]

[Out]

3/5*cot(d*x+c)*EllipticPi((-3+2*cos(d*x+c))^(1/2)/(-cos(d*x+c))^(1/2),-1/2,1/5*I*5^(1/2))*(1-sec(d*x+c))^(1/2)
*(1+sec(d*x+c))^(1/2)/d*5^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.037, Rules used = {2887} \begin {gather*} \frac {3 \cot (c+d x) \sqrt {1-\sec (c+d x)} \sqrt {\sec (c+d x)+1} \Pi \left (-\frac {1}{2};\text {ArcSin}\left (\frac {\sqrt {2 \cos (c+d x)-3}}{\sqrt {-\cos (c+d x)}}\right )|-\frac {1}{5}\right )}{\sqrt {5} d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[-Cos[c + d*x]]/Sqrt[-3 + 2*Cos[c + d*x]],x]

[Out]

(3*Cot[c + d*x]*EllipticPi[-1/2, ArcSin[Sqrt[-3 + 2*Cos[c + d*x]]/Sqrt[-Cos[c + d*x]]], -1/5]*Sqrt[1 - Sec[c +
 d*x]]*Sqrt[1 + Sec[c + d*x]])/(Sqrt[5]*d)

Rule 2887

Int[Sqrt[(b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Simp[2*c*Rt[b
*(c + d), 2]*Tan[e + f*x]*Sqrt[1 + Csc[e + f*x]]*(Sqrt[1 - Csc[e + f*x]]/(d*f*Sqrt[c^2 - d^2]))*EllipticPi[(c
+ d)/d, ArcSin[Sqrt[c + d*Sin[e + f*x]]/Sqrt[b*Sin[e + f*x]]/Rt[(c + d)/b, 2]], -(c + d)/(c - d)], x] /; FreeQ
[{b, c, d, e, f}, x] && GtQ[c^2 - d^2, 0] && PosQ[(c + d)/b] && GtQ[c^2, 0]

Rubi steps

\begin {align*} \int \frac {\sqrt {-\cos (c+d x)}}{\sqrt {-3+2 \cos (c+d x)}} \, dx &=\frac {3 \cot (c+d x) \Pi \left (-\frac {1}{2};\sin ^{-1}\left (\frac {\sqrt {-3+2 \cos (c+d x)}}{\sqrt {-\cos (c+d x)}}\right )|-\frac {1}{5}\right ) \sqrt {1-\sec (c+d x)} \sqrt {1+\sec (c+d x)}}{\sqrt {5} d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 0.17, size = 140, normalized size = 1.82 \begin {gather*} \frac {2 i \sqrt {\frac {\cos (c+d x)}{1+\cos (c+d x)}} \sqrt {-3+2 \cos (c+d x)} \left (F\left (i \sinh ^{-1}\left (\sqrt {5} \tan \left (\frac {1}{2} (c+d x)\right )\right )|-\frac {1}{5}\right )-2 \Pi \left (\frac {1}{5};i \sinh ^{-1}\left (\sqrt {5} \tan \left (\frac {1}{2} (c+d x)\right )\right )|-\frac {1}{5}\right )\right )}{\sqrt {5} d \sqrt {-\cos (c+d x)} \sqrt {\frac {3-2 \cos (c+d x)}{1+\cos (c+d x)}}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[-Cos[c + d*x]]/Sqrt[-3 + 2*Cos[c + d*x]],x]

[Out]

((2*I)*Sqrt[Cos[c + d*x]/(1 + Cos[c + d*x])]*Sqrt[-3 + 2*Cos[c + d*x]]*(EllipticF[I*ArcSinh[Sqrt[5]*Tan[(c + d
*x)/2]], -1/5] - 2*EllipticPi[1/5, I*ArcSinh[Sqrt[5]*Tan[(c + d*x)/2]], -1/5]))/(Sqrt[5]*d*Sqrt[-Cos[c + d*x]]
*Sqrt[(3 - 2*Cos[c + d*x])/(1 + Cos[c + d*x])])

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 151 vs. \(2 (67 ) = 134\).
time = 0.21, size = 152, normalized size = 1.97

method result size
default \(-\frac {\sqrt {2}\, \left (\EllipticF \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}, i \sqrt {5}\right )-2 \EllipticPi \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}, -1, i \sqrt {5}\right )\right ) \sqrt {-\frac {2 \left (-3+2 \cos \left (d x +c \right )\right )}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \left (\sin ^{2}\left (d x +c \right )\right ) \sqrt {-\cos \left (d x +c \right )}}{d \sqrt {-3+2 \cos \left (d x +c \right )}\, \left (-1+\cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}\) \(152\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-cos(d*x+c))^(1/2)/(-3+2*cos(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/d*2^(1/2)*(EllipticF((-1+cos(d*x+c))/sin(d*x+c),I*5^(1/2))-2*EllipticPi((-1+cos(d*x+c))/sin(d*x+c),-1,I*5^(
1/2)))*(-2*(-3+2*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*sin(d*x+c)^2/(-3+2*cos(d*
x+c))^(1/2)*(-cos(d*x+c))^(1/2)/(-1+cos(d*x+c))/cos(d*x+c)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-cos(d*x+c))^(1/2)/(-3+2*cos(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(-cos(d*x + c))/sqrt(2*cos(d*x + c) - 3), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-cos(d*x+c))^(1/2)/(-3+2*cos(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

integral(sqrt(-cos(d*x + c))/sqrt(2*cos(d*x + c) - 3), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {- \cos {\left (c + d x \right )}}}{\sqrt {2 \cos {\left (c + d x \right )} - 3}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-cos(d*x+c))**(1/2)/(-3+2*cos(d*x+c))**(1/2),x)

[Out]

Integral(sqrt(-cos(c + d*x))/sqrt(2*cos(c + d*x) - 3), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-cos(d*x+c))^(1/2)/(-3+2*cos(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(-cos(d*x + c))/sqrt(2*cos(d*x + c) - 3), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {-\cos \left (c+d\,x\right )}}{\sqrt {2\,\cos \left (c+d\,x\right )-3}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-cos(c + d*x))^(1/2)/(2*cos(c + d*x) - 3)^(1/2),x)

[Out]

int((-cos(c + d*x))^(1/2)/(2*cos(c + d*x) - 3)^(1/2), x)

________________________________________________________________________________________